package com.wgworkshop.pems.repository;

import com.wgworkshop.pems.common.enums.ClassArrangeStatusEnum;
import com.wgworkshop.pems.entity.ClassArrangeEntity;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

/**
 * 班级安排库。
 * Created by wlc on 2017/10/11.
 */
@Repository
public interface ClassArrangeRepository extends PagingAndSortingRepository<ClassArrangeEntity, Long>, ClassArrangeRepositoryCustom {
    Iterable<ClassArrangeEntity> findByStudentId(Long id, Sort sort);

    ClassArrangeEntity findFirstByStudentIdAndStatus(Long studentId, ClassArrangeStatusEnum status);
}
